<script setup lang="ts">
import { provide, toRefs } from "vue";

/* 切换视图组件 */

defineOptions({ name: "toggle-view" });

const props = defineProps({
  activeKey: { type: String },
});

const propsRef = toRefs(props);
provide("toggle-view:active-key", propsRef.activeKey);
</script>

<template>
  <slot />
</template>
